<script setup>
	let arrs = [{
		id: 1,
		name: "HTML5"
	}, {
		id: 2,
		name: "JavaScript"
	}, {
		id: null,
		name: "小程序"
	}, {
		name: "NodeJS"
	}, {
		id: 3,
		name: "VueJS"
	}];

	let newArrs = arrs.filter(item => item.id).map(item => ({
		...item,
		author: "ABC"
	}))

	console.log(newArrs);

	// let arrs = [5,1,2,3,4,8,6];
	// let index=arrs.indexOf(3)
	// console.log(index);
</script>
<template>
	<view class="">

	</view>
</template>
<style lang="scss" scoped>

</style>